package collection;

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Queue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @Auther: 杨通通
 * @Date: 2024/10/25 23:40
 * @Description:
 */
public class queue1 {

    public static void main(String[] args) throws InterruptedException {
        LinkedBlockingQueue<String> queue1 = new LinkedBlockingQueue<>(4);
//        Queue<String> queue = queue1
        queue1.add("a");
        queue1.put("b");//队列慢阻塞
        queue1.add("c");
        queue1.add("d");
        queue1.put("e");
        queue1.take();//无数据阻塞
        queue1.poll();//无数据返回null
        queue1.remove();//无数据阻塞





    }
}